{
    let sum = (num1: number): number => {
        return num1
    }
    let sum2 = (num2: string): string => {
        return num2
    }
    let sum3 = (num3: boolean): boolean => {
        return num3
    }
    let sum4 = (num4: any): any => {
        return num4
    }


    //泛型
    let num5 = <T>(num: T): T => {
        return num
    }
    num5<string>('1')
    num5<number>(1)
    num5<boolean>(true)
    //类里面使用泛型
    class Person<T> {
        name!: T
    }
    new Person<string>()
}
